package cn.zsb.web;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;

/**
 * @author oldliu
 * @since 1.0
 */
@Controller
public class HelloController {

    @RequestMapping("/sayhello")
    public ModelAndView sayhi(@RequestParam(name = "who",defaultValue = "laogao",required = false) String who){
        ModelAndView mv=new ModelAndView();
        mv.addObject("msg",who+",大闸好才是真的好");
        mv.setViewName("forward:show.jsp");//web-inf/jsps/show.jsp.jsp
        return mv;
    }
}
